package cn.power.win.win_power.acitivity;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.os.Handler;

import cn.power.win.win_power.R;
import me.jessyan.autosize.internal.CustomAdapt;

public class SplashActivity extends Activity implements CustomAdapt {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

        //延迟显示图片1秒钟
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                //跳转到主页面
                startActivity(new Intent(SplashActivity.this, MainActivity.class));

            }
        }, 1000);
    }

    @Override
    public boolean isBaseOnWidth() {
        return false;
    }
    //
    @Override
    public float getSizeInDp() {
        return 480;
    }
}
